{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 搭建SpikingJelly环境\n",
    "\n",
    "作者: [赵振宇](https://github.com/15947470421)\n",
    "\n",
    "感谢朱文凯为本教程提供的建议"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "*建议* 在安装SpikingJelly之前，请确保已经自行安装了pytorch。\n",
    "\n",
    "pip安装SpikingJelly会默认安装pytorch 3.5(CPU)，如果希望使用CUDA版本的pytorch，请确保在安装SpikingJelly之前，自行在该anaconda环境中安装好pytorch(CUDA)。\n",
    "\n",
    "(*推荐*)在anaconda控制台中使用以下代码获取稳定版SpikingJelly安装包：\n",
    "```\n",
    "pip install spikingjelly\n",
    "```\n",
    "\n",
    "(*注意*)：如果没有spikingjelly请尝试切换pip的镜像源，实测清华源可以正常安装"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "安装完成后，运行以下代码，如果没有报错，则说明安装环境成功！"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from spikingjelly.activation_based import neuron\n",
    "if_layer = neuron.IFNode()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "SpikingJelly_zzy",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
